﻿//------------------------------------------------------------------------------
// <copyright file="CommerceServerCodeGenerationConfigurationSection.cs" company="CommerceServer.net, Inc">
//    (c) 2012 CommerceServer.net, Inc. and its affiliates. All rights reserved.
// </copyright>
// <summary></summary>
//------------------------------------------------------------------------------ 

namespace CommerceServerContrib.CodeGeneration.Configuration
{
    using System.Configuration;

    public class CommerceServerCodeGenerationConfigurationSection : ConfigurationSection
    {
        private const string EntitiesToIgnoreElementName = "entitiesToIgnore";
        private const string EntitiesToGenerateElementName = "entitiesToGenerate";
        private const string HandlersToMethodNameElementName = "handlersToMethodName";

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Lets the configuration runtime set the collection.")]
        [ConfigurationProperty(EntitiesToIgnoreElementName, IsRequired = false)]
        public GenerationEntityElementCollection EntitiesToIgnore
        {
            get { return (GenerationEntityElementCollection)this[EntitiesToIgnoreElementName]; }
            set { this[EntitiesToIgnoreElementName] = value; }
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Lets the configuration runtime set the collection.")]
        [ConfigurationProperty(EntitiesToGenerateElementName, IsRequired = false)]
        public GenerationEntityElementCollection EntitiesToGenerate
        {
            get { return (GenerationEntityElementCollection)this[EntitiesToGenerateElementName]; }
            set { this[EntitiesToGenerateElementName] = value; }
        }

        [ConfigurationProperty(HandlersToMethodNameElementName, IsRequired = false)]
        public HandlersToMethodNameElementCollection HandlersToMethodName
        {
            get { return (HandlersToMethodNameElementCollection)this[HandlersToMethodNameElementName]; }
        }
    }
}
